using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using System.Collections;

namespace Microsoft.PowerShell.CmdletManagement
{
    public partial class CmdletSummaryControl : System.Windows.Controls.UserControl
    {
        public CmdletSummaryControl()
        {
            InitializeComponent();
        }

        protected override void OnRender(DrawingContext drawingContext)
        {
            CmdletDesignerUtils.DisableAllCustomControls(this);

            if (CmdletDesignerUtils.IsInRole(PsSpecProjectRole.SpecWriter, Application.Current))
            {
                Verb.IsReadOnly = false;
                Noun.IsReadOnly = false;
                ShortDescription.IsReadOnly = false;
            }

            if (CmdletDesignerUtils.IsInRole(PsSpecProjectRole.HelpWriter, Application.Current))
            {
                HelpShortDescription.IsReadOnly = false;
            }

            base.OnRender(drawingContext);
        }
    }
}